# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=python-watchgod
pkgver=0.8.2
pkgrel=2
epoch=1
pkgdesc='Simple, modern file watching and code reload in python'
arch=('any')
url='https://github.com/samuelcolvin/watchfiles'
license=('MIT')
depends=('python' 'python-anyio')
makedepends=('python-setuptools' 'python-setuptools-rust' 'rust')
source=("watchgod-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha512sums=('a44b831352ace03c450781bc815b1813c44c386d666a9b724b562ff69228705651bfc23e81b7344d0f79c62577d4f910b323c734298e2a609f85bbc4a0f0498e')

prepare() {
  cd watchfiles-$pkgver
  sed "s/0.0.dev0/$pkgver/" -i watchgod/version.py
}

build() {
  cd watchfiles-$pkgver
  python setup.py build
}

package() {
  cd watchfiles-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

# vim: ts=2 sw=2 et:
